package io.github.elkan1788.osc.nutzdemo.modules;

import java.util.Map;

import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json;
import org.nutz.log.Log;
import org.nutz.log.Logs;
import org.nutz.mvc.annotation.At;

/**
 * 检测系统运行环境
 * 
 * @author 凡梦星尘(elkan1788@gmail.com)
 * @since 1.0
 *
 */
@IocBean
@At("/init")
public class SystemEnvModule {

	private static final Log log = Logs.get();

	@At("/sysenv")
	public Object systemEnv() {
		Map<String, String> env = System.getenv();
		log.infof("Sysetm enviroment: %s", Json.toJson(env));
		return env;
	}
}
